package cn.com.dcsgo.library.admin.domain.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * @author Dcsgo
 * @since 2024/9/4 09:39
 */
@Data
public class SaveBookRequest {
    @ApiModelProperty("图书标题")
    private String title;

    @ApiModelProperty("作者姓名")
    private String author;

    @ApiModelProperty("国际标准书号")
    private String isbn;

    @ApiModelProperty("图书分类")
    private String category;

    @ApiModelProperty("出版日期")
    @DateTimeFormat(pattern = "yyyy-M-d")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-M-d")
    private LocalDate publishedDate;

    @ApiModelProperty("复本数量")
    private Long copiesNumber;
}
